import Vue from 'vue'
import Vuex from 'vuex'
import state from './state'
import mutations from './mutations'
Vue.use(Vuex)
export default new Vuex.Store({
    state,
    mutations,
    actions:{
        togHeadDetail(ctx, bool){
            ctx.commit('togHeadDetail', bool);
        },
        clickGoodsMenu(ctx, index){
            ctx.commit('clickGoodsMenu', index);
        },
        scrollGoodsMenu(ctx,scrollY){
            ctx.commit('scrollGoodsMenu', scrollY);
        },
        scrollGoodsItem(ctx,scrollY){
            ctx.commit('scrollGoodsItem', scrollY);
        }
    },
})
